@extends("admin.layout.main")

@section("content")
    <section class="content-header">
        <h1>
            角色列表
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"> 系统管理</a></li>
            <li><a href="/admin/roles">角色管理</a></li>
        </ol>
    </section>

    <section class="content">
        <!-- Small boxes (Stat box) -->
        <div class="row">
            <div class="col-lg-12 col-xs-12">
                <div class="box">

                    <div class="box-header with-border">
                        <h3 class="box-title">
                            <a type="button" class="btn " href="/admin/roles/create" >增加角色</a>

                        </h3>
                    </div>

                <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered">
                            <tbody><tr>
                                <th style="width: 10px">#</th>
                                <th>角色名称</th>
                                <th>角色描述</th>
                                <th>操作</th>
                            </tr>

                            @foreach($roles as $role)
                            <tr>
                                <td>{{$role->id}}</td>
                                <td>{{$role->name}}</td>
                                <td>{{$role->description}}</td>
                                <td>
                                    <a type="button" class="btn" href="/admin/roles/{{$role->id}}/permission" >权限管理</a>
                                </td>
                            </tr>
                            @endforeach
                            </tbody></table>
                    </div>

                    <div id="pagination">
                        {{$roles->links()}}
                    </div>

                </div>
            </div>
        </div>
    </section>
@endsection